{{if validation_errors()}}
<ul class="message error">
    <li>{{validation_errors()}}</li>
</ul>
{{/if}}

<div class="clear"></div>
<form class="block-content form" id="simple_form" method="post" action="create">
    <h1>{{$configuration->lang->line('config')}}</h1>
    <ul class="tabs js-tabs same-height">
        <li class="current"><a href="#tab-locales" title="Locales">{{$configuration->lang->line('current')}}</a></li>
        <li><a href="#tab-options" title="Options">{{$configuration->lang->line('options')}}</a></li>    
    </ul>
    <div class="tabs-content">

        <div id="tab-locales">
            {{if isset($configuration->id)}}{{form_hidden('id', $configuration->id)}}{{/if}}

            <fieldset class="grey-bg required">			
                <legend>{{$configuration->lang->line('required')}}</legend>
                <p>
                    <label>{{$configuration->localize_label('title')}}</label>
                    <input type="text" name="title" id="simple-required" value="{{if isset($configuration->title)}}{{$configuration->title}}{{/if}}" class="full-width">
                    {{form_error('title')}}
                </p>

                <p>
                    <label>{{$configuration->localize_label('code')}} (tuyệt đối không thay đổi phần này nếu không hiểu rõ)</label>
                    <input type="text" name="code" id="simple-required" value="{{if isset($configuration->code)}}{{$configuration->code}}{{/if}}" class="full-width">
                    {{form_error('code')}}
                </p>
            </fieldset>

            <fieldset>
                <legend>{{$configuration->lang->line('other_info')}}</legend>

                <p>
                    <label>{{$configuration->lang->line('value')}}</label>
                    <textarea name="value" cols="10" class="full-width text-editor">{{if isset($configuration->value)}}{{$configuration->value}}{{/if}}</textarea>
                </p>

                <p>
                    <label>{{$configuration->lang->line('description')}}</label>
                    <textarea name="description" cols="10" class="full-width text-editor tinymcesimple">{{if isset($configuration->description)}}{{$configuration->description}}{{/if}}</textarea>
                </p>
            </fieldset>


        </div>
        <div id="tab-options">
            <p>
                <label for="simple-select">{{$configuration->lang->line('language')}}</label>
                <select name="lang_id" id="simple-select" class="full-width">					
                    {{html_options options=$language->get_list() selected=$configuration->language_id}}
                </select>
            </p>
        </div>
        <br><br><br><br>
        <fieldset class="grey-bg no-margin">
            <legend>{{$configuration->lang->line('action')}}</legend>
            <p class="input-with-button">
                <button type="submit">{{$configuration->lang->line('save')}}</button>
            </p>
        </fieldset>
    </div>
</form>
